home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Telecom / Scripts / ARA SupraFaxModem Scripts / SupraFaxModem(L) v.32bis / SupraFaxModem(L) v.32bis next >
Text File  |  1992-04-08  |  4KB  |  207 lines

  1. ! "Supra SupraFaxModem v.32bisL - 4/8/91"
  2. ! "This modem Script keeps trying till it gets through.
  3. ! "great for automatting your mac"
  4. ! "Written by Steve Kruse "
  5. @ORIGINATE
  6. @ANSWER
  7. !
  8. @LABEL 1
  9. serreset 57600, 0, 8, 1
  10. !
  11. ! first recall the factory configuration for the Mac
  12. !
  13. matchclr
  14. settries 0
  15. matchstr 1 3 "OK\13\10"
  16. @LABEL 2
  17. write "AT&F1\13"
  18. matchread 30
  19. inctries
  20. iftries 2 59
  21. jump 2
  22. !
  23. ! Next, Set up the configuration: Echo off, turn that ugly sounding speaker OFF.
  24. ! If you want to hear the speaker remove the M0 from the write statement below.
  25. @LABEL 3
  26. matchstr 1 5 "OK\13\10"
  27. write "ATE0M0\13"
  28. matchread 30
  29. jump 59
  30. !
  31. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  32. !
  33. @LABEL 5
  34. matchclr
  35. ifstr 2 8 "1"
  36. matchstr 1 8 "OK\13\10"
  37. write "ATM0\13"
  38. matchread 30
  39. jump 59
  40. !
  41. ! The modem is ready.  So enable answering, or originate a call
  42. ! Mickey Mouse has big ears.
  43. ! Donald Duck has big feet.
  44. @LABEL 8
  45. ifANSWER 30
  46. note "Dialing ^1" 3
  47. write "ATDT^1\13"
  48. !
  49. @LABEL 9
  50. matchstr  1 11 "CONNECT 14400\13\10"
  51. matchstr  2 12 "CONNECT 57600\13\10"
  52. matchstr  3 13 "CONNECT 9600\13\10"
  53. matchstr  4 14 "CONNECT 2400\13\10"
  54. matchstr  5 50 "NO CARRIER\13\10"
  55. matchstr  6 50 "ERROR\13\10"
  56. matchstr  7 52 "NO DIALTONE\13\10"
  57. matchstr  8 53 "BUSY\13\10"
  58. matchstr  9 54 "NO ANSWER\13\10"
  59. matchread 700
  60. jump 59
  61. !
  62. @LABEL 11
  63. note "Communicating at 14400 bps." 2
  64. serreset 14400, 0, 8, 1
  65. jump 16
  66. !
  67. @LABEL 12
  68. note "Communicating at 57600 bps." 2
  69. serreset 57600, 0, 8, 1
  70. jump 16
  71. !
  72. @LABEL 13
  73. note "Communicating at 9600 bps." 2
  74. serreset 9600, 0, 8, 1
  75. jump 16
  76. !
  77. @LABEL 14
  78. note "Communicating at 2400 bps." 2
  79. serreset 2400, 0, 8, 1
  80. jump 16
  81. !
  82. @LABEL 15
  83. note "Resetting modem, Retry in a Second."
  84. pause 15
  85. note "If you like this script send $5.00"
  86. pause 15
  87. note "To Steve Kruse"
  88. pause 15
  89. note "49 Main St."
  90. pause 15
  91. note "Springville, NY 14141"
  92. pause 15
  93. note "Thank you."
  94. pause 7
  95. jump 8
  96. !
  97. @LABEL 16
  98. ifANSWER 17
  99. pause 30
  100. @LABEL 17
  101. exit 0
  102. !
  103. ! @ANSWER
  104. ! Set up the modem to answer
  105. @LABEL 30
  106. write "ATS0=1\13"
  107. matchstr 1 31 "OK\13\10"
  108. matchread 30
  109. jump 59
  110. !
  111. @LABEL 31
  112. matchstr 1  32 "RING\13\10"
  113. matchstr 2  11 "CONNECT 14400\13\10"
  114. matchstr 3  12 "CONNECT 57600\13\10"
  115. matchstr 4  13 "CONNECT 9600\13\10"
  116. matchstr 5  14 "CONNECT 2400\13\10"
  117. matchstr 6  50 "NO CARRIER\13\10"
  118. matchstr 7  50 "ERROR\13\10"
  119. matchstr 8  52 "NO DIALTONE\13\10"
  120. matchstr 9  53 "BUSY\13\10"
  121. matchstr 10  54 "NO ANSWER\13\10"
  122. matchread 700
  123. jump 31
  124. !
  125. @LABEL 32
  126. userhook 1
  127. note "Answering phone…" 2
  128. jump 31
  129. !
  130. ! 50: error messages
  131. !
  132. @LABEL 50
  133. write "Modems couldn't connect."
  134. pause 10
  135. jump 15
  136. !exit -6021
  137. !
  138. @LABEL 52
  139. note "Can't get a dial tone"
  140. pause 30
  141. jump 15
  142. !exit -6020
  143. !
  144. @LABEL 53
  145. note "Number dialed is busy."
  146. pause 30
  147. jump 15
  148. !exit -6022
  149. !
  150. @LABEL 54
  151. note "No Answer"
  152. pause 30
  153. jump 15
  154. !exit -6023
  155. !
  156. @LABEL 59
  157. note "Hardware error, Check connections."
  158. pause 30
  159. jump 15
  160. !exit -6019
  161. !
  162. ! Hang up the modem
  163. !
  164. @HANGUP
  165. @LABEL 60
  166. settries 0
  167. @LABEL 61
  168. write "ATH0\13"
  169. matchclr
  170. matchstr 1 64 "OK\13\10"
  171. matchstr 2 64 "NO CARRIER\13\10"
  172. matchstr 3 64 "ERROR\13\10"
  173. matchread 15
  174. inctries
  175. iftries 3 64
  176. ! no response, try escape sequence
  177. write "+++"
  178. matchclr
  179. matchstr 1 62 "OK\13\10"
  180. matchread 18
  181. !
  182. ! No response from modem, toggle DTR
  183. !
  184. DTRClear
  185. pause 10
  186. DTRSet
  187. jump 61
  188. !
  189. @LABEL 62
  190. matchclr
  191. matchstr 1 64 "OK\13\10"
  192. matchstr 2 64 "NO CARRIER\13\10"
  193. write "ATH0\13"
  194. matchread 50
  195. jump 61
  196. !
  197. ! Recall the factory settings for macintosh communications. & Leave Echo On.
  198. !
  199. @LABEL 64
  200. matchclr
  201. matchstr 1 65 "OK\13\10"
  202. write "AT&F1\13"
  203. matchread 30
  204. !
  205. @LABEL 65
  206. exit 0
  207.